package ar.com.spsolutions.splibrary.book.category;

import java.util.HashSet;
import java.util.Set;

import ar.com.spsolutions.splibrary.book.Book;
import ar.com.spsolutions.splibrary.entity.Entity;

public class Category extends Entity {

	private static final long serialVersionUID = 1L;

	private Set<Book> books = new HashSet<Book>();

	private String name;

	public Category(final String name) {
		super();
		this.name = name;
	}

	public Category() {
		super();
	}

	public void addBook(final Book aBook) {
		this.getBooks().add(aBook);
	}

	public void removeBook(final Book aBook) {
		this.getBooks().remove(aBook);
	}

	public String getName() {
		return this.name;
	}

	public void setName(final String name) {
		this.name = name;
	}

	public Set<Book> getBooks() {
		return this.books;
	}

	public void setBooks(final Set<Book> books) {
		this.books = books;
	}

}
